﻿using System.Modules.Contracts.Attributes;

namespace System.Modules.SharePoint.Contracts.Attributes
{
    /// <summary>
    /// Binding Field | Use this attribute to map Field to the property.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class BindingSPField : BindingField
    {
        #region Public Properties
        #endregion

        #region Constructors
        /// <summary>
        /// Default Constructor
        /// </summary>
        public BindingSPField() {}

        /// <summary>
        /// Mapping SP Field | Field Name
        /// </summary>
        /// <param name="fieldName"></param>
        public BindingSPField(string fieldName) : base(fieldName) {}

        /// <summary>
        /// Mapping SP Field | Field Name | Function to return Field Value
        /// </summary>
        /// <param name="fieldName"> </param>
        /// <param name="function"></param>
        public BindingSPField(string fieldName, Func<object, object> function) : base(fieldName, function) {}
        #endregion
    }
}